#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <assert.h>

using namespace std;

class list
{
public:
	int val;
	list* next;
	list* prev;

	list* CreateNode(int x)
	{
		list* newnode = (list*)malloc(sizeof(list));
		assert(newnode);

		newnode->val = x;
		newnode->next = nullptr;
		newnode->prev = nullptr;

		return newnode;
	}

	list* Init()
	{
		list* phead = CreateNode(-1);
		phead->next = phead;
		phead->prev = phead;

		return phead;
	}

	void Print()
	{
		list* cur = phead->next;

	}

	void push(int x)
	{
		

	}

};

int main()
{
	
	return 0;
}